package com.kefu.chat.vo;

import javax.validation.constraints.NotEmpty;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.kefu.chat.model.ChatReply;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractUpdateVo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;


@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "chat_reply")
public class ChatReplyUpdateVo extends AbstractUpdateVo<ChatReply, String> {
    @NotEmpty
    @ApiModelProperty(name = "id", value = "主键")
    private String id;
    @ApiModelProperty(name = "name", value = "内容")
    private String name;
    @ApiModelProperty(name = "keyword", value = "关键词")
    private String keyword;
    @Override
    public ChatReply convert() {
        ChatReply info = BeanUtil.toBean(this, ChatReply.class);
        info.setUpdateTime(DateUtil.current());
        return info;
    }

}